﻿/**
 * create:dpyang
 * create:2013-4-5
 * describe:用户数据
 */
Ext.define('WeCompany.store.Users', {
	extend:'Ext.data.Store',

	model: 'WeCompany.model.User',

	// 禁止批量操作
	batchActions:false,

	autoLoad:true,

	proxy:{
		type:'ajax',
		//
		api:{
		    read: 'Account/LoadAllByPage',
		    destroy: 'Account/Removes',
           update: "Account/Edit",
           create: "Account/Add"
        },reader: {
           type: 'json',
           root: "data",
           messageProperty: "Msg"
        },writer: {
           type: "json",
           encode: true,
           root: "data",
           allowSingle: true  //这里设置提交json格式false是:[{'name':'dpyang'}]true是{'name':'dpyang'}
        },listeners: {
            //exception: SimpleCMS.ProxyException
        }
	}
});